// components/button/buttons.js
Component({
  properties: {
    type: String
  },
  externalClasses: ['select-id', 'submit-id'],
  methods: {
    handleClick: function (e) {
      const {currentTarget:{dataset:{type}}} = e
      const btnType = type ? {type} : null
      
      this.triggerEvent('btnClick', btnType)
    }
  }
})